import http from '@/utils/request'
/**
 * 获取分页商品列表数据
 * @param {String} query 查询的关键字
 * @param {Number} pagenum 当前页码
 * @param {Number} pagesize 每页显示的条数
 * @returns
 */
export const goodsListApi = ({
    query,
    pagenum,
    pagesize
}) => {
    return http('/goods', 'get', {
        query,
        pagenum,
        pagesize
    })
}

/**
 * 商品添加
 * @param {object} submitData 表单选项，包含goods_name、goods_price等
 * @returns
 */

export const addGoodsApi = submitData => {
    return http('/goods', 'post', submitData)
}